import axios from '@/libs/axios1'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }
//let base = '/testplatform/product'
let base = '/testplatform/vendor'

export const queryVendor = params => {
  return axios({
    url: `${base}`,
    method: 'GET',
    params,
    headers: jsonHeaders,
  })
}
export const addVendor = data => {
  return axios({
    url: `${base}`,
    method: 'POST',
    headers: jsonHeaders,
    data
  })
}
export const updateVendor = data => {
  return axios({
    url: `${base}`,
    method: 'PUT',
    headers: jsonHeaders,
    data
  })
}
export const deleteVendor = id => {
  return axios({
    url: `${base}/${id}`,
    method: 'DELETE',
    headers: jsonHeaders,
  })
}